<template>
  <div class="null">
    <div class="num">
      <div
        class="card"
        v-for="item in countData"
        :key="item.index"
        :style="{ background: item.attributes.color }"
      >
        <p class="deic">{{ item.attributes.name }}</p>
        <p class="price">{{ item.attributes.value }}人</p>
      </div>
    </div>
    <!-- <div class="numm">
      <el-card style="height: 300px; width: 380px; margin-top: 150px">
        <div ref="echarts2" style="height: 300px"></div>
      </el-card>
    </div> -->
  </div>
</template>

<script>
import AV from "leancloud-storage";
// import * as echarts from "echarts";

export default {
  data() {
    return {
      countData: [],
    };
  },
  created() {
    // 获取数据
    const query = new AV.Query("countData");

    query.find().then((res) => {
      console.log(res);
      this.countData = res;
    });
  },

};
</script>

<style lang="less" scoped>
// .null {
//   display: flex;
//   flex-direction: column;
// }
.num {
  height: 50px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  // margin-right: 50px;
  .card {
    width: 30%;
    height: 70px;
    margin-bottom: 15px;
    .price {
      font-size: 8px;
      text-align: center;
    }
    .deic {
      font-size: 12px;
      color: white;
      text-align: center;
    }
  }
  .numm{
    margin-top: 100px;
  }
}
</style>
